package com.diors.commons.thread;

import com.diors.commons.log.DiorsLogger;

/**
 * 选择器任务基类
 * @author darren.ouyang
 * @date 2013-9-14
 */
public abstract class SelecterWrapper implements Runnable
{

	protected final DiorsLogger	log	= DiorsLogger.getLogger(getClass());
	
	@Override
	public void run() 
	{
		try 
		{
			runImpl();
		}
		catch (Exception e)
		{
			log.warn("线程运行时，出现的异常", e);
		}
	}
	
	protected abstract void runImpl();
	
	protected abstract int selecterCode ();
}
